package com.yanmaohu.nikita.data.function;

import com.yanmaohu.nikita.data.expression.Expression;

/**
 * @author Bright Lee
 */
public final class Interval {

    private final int beginIndex;
    private final int endIndex;
    private final boolean lowerLimitClosed;
    private final Expression lowerLimit;
    private final boolean upperLimitClosed;
    private final Expression upperLimit;

    public Interval(int beginIndex,
                    int endIndex,
                    boolean lowerLimitClosed,
                    Expression lowerLimit,
                    boolean upperLimitClosed,
                    Expression upperLimit) {
        this.beginIndex = beginIndex;
        this.endIndex = endIndex;
        this.lowerLimitClosed = lowerLimitClosed;
        this.lowerLimit = lowerLimit;
        this.upperLimitClosed = upperLimitClosed;
        this.upperLimit = upperLimit;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public boolean isLowerLimitClosed() {
        return lowerLimitClosed;
    }

    public Expression getLowerLimit() {
        return lowerLimit;
    }

    public boolean isUpperLimitClosed() {
        return upperLimitClosed;
    }

    public Expression getUpperLimit() {
        return upperLimit;
    }

}
